/*******************************************************************************
 * Copyright (c) 2006 Ultimate Technology, Inc.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Bojan Vukojevic - initial API and implementation
 *******************************************************************************/
package com.ultimatetech.cim;

import org.eclipse.swt.SWT;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

/**
 * 
 *
 */
public class CIMPerspective implements IPerspectiveFactory {

	/* (non-Javadoc)
	 * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
	 */
	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);		
		layout.addView("com.ultimatetech.cim.views.CIMExplorerView", IPageLayout.LEFT, 0.25f, editorArea);
		IFolderLayout topFolder = layout.createFolder("topFolder", IPageLayout.TOP, 0.5f, editorArea);
		topFolder.addPlaceholder("com.ultimatetech.cim.views.CIMQueryView:*");
		topFolder.addView("com.ultimatetech.cim.views.CIMQueryView");
		
		IFolderLayout bottomFolder = layout.createFolder("bottomFolder", IPageLayout.BOTTOM, 0.5f, editorArea);
		bottomFolder.addPlaceholder("com.ultimatetech.cim.views.CIMInstanceView:*");
		bottomFolder.addView("com.ultimatetech.cim.views.CIMInstanceView");
		
		bottomFolder.addPlaceholder("com.ultimatetech.cim.views.CIMClassHierarchyView:*");
		bottomFolder.addView("com.ultimatetech.cim.views.CIMClassHierarchyView");
		
	}

}
